/**********
* 页面样式
***********/



/*============
* 基本默认值
================*/

html {
  font-size: 62.5%;
  color: #222;
}

::selection {
  background-color: #b3d4fc;
  text-shadow: none;
}

ul {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

/* ===============
   自定义页面样式
   =============== */

body {
    font-size: 1.2rem;
    line-height: 1.5;
    background-color: #f7f7f7;
}

a {
    color: #666;
    text-decoration: none;
}

a:hover, a:active {
    color: #0ae;
    text-decoration: none;
}

/* 网站头部 */

.top {
  line-height: 3rem;
  padding: 1.5rem;
  color: #fff;
  background: #d81e06;
}

.top-title {
  font-size: 1.8rem;
  font-weight: 900;
}

.sub-title {
  font-size: 1.5rem;
}

/* 网站选项卡 */


.container > nav > .menu {
  width: 100%;
  line-height: 1.6rem;
  padding: 5px 0 5px 2rem;
  font-size: 1.6rem;
  font-weight: bold;
}


.container > nav > a {
  display: none;
}




@media only screen and (min-width: 50em) {


  .menu-item > li {
      width: 100px;
      display: inline-block;
      padding: 1rem 0;
      border-left: 1px solid #f0ede9;
      text-align: center;
      position: relative;
  }

  .menu-item > li:hover {
      display: inline-block;
      border-left: 1px solid #f0ede9;
  }

  .menu-item > li:hover ul {
      display: block;
      position: absolute;
      background: #fff;
  }

  .menu-item > li > ul {
    width: 100px;
    text-align: center;
    display: none;
    margin-top: 1rem;
  }


  .second-menu-item > li {
    display: inline-block;
    width: 100%;
    padding: 3px 0 3px 0;
    text-align: center;
    height: 2rem;
    border: 1px #ff0000 solid;
    position: relative;
    background-color: SkyBlue;/* TODO:你的背景颜色加在了ul 里面   应该家在li里面   */
  }

  .second-menu-item > li:hover {
    background-color: #e6e6e6;
  }

  .second-menu-item > li:nth-child(3) > ul {
      display: none;
  }

  .second-menu-item > li:nth-child(3):hover > ul {
      display: block;
      position: absolute;
      left: 8.4rem;/* TODO: 因为二级菜单和三级菜单之间有个间距，当你的鼠标恰好在 */
      top: 0px;
      text-align: center;
      width: 100px;
      height: auto;
  }

  .second-menu-item > li:nth-child(3) > ul > li {
      width: 100%;
      height: 2rem;
      padding: 3px 0 3px 0;
      border: 1px #eee solid;
      background-color: pink;/* TODO:你的背景颜色加在了ul 里面   应该家在li里面   */
  }

  .second-menu-item > li:nth-child(3) > ul > li:hover {
      background-color: #e6e6e6;
  }
}

@media only screen and (min-width: 30.0625em) and (max-width: 50em) {

  .container > nav {
    background: #000000;
    height: auto;
  }

  .container > nav > div {
    display: none;
  }

  .container > nav > a {
    display: block;
    font-size: 1.6rem;
    font-weight: bold;
    padding: 1rem 2rem;
  }

  .menu-item {
    display: none;
  }

  .menu-item li {
    height: auto;
    padding: 1rem 0 0 1rem;
  }

  .second-menu-item {
    display: none;
    height: auto;
  }

  .second-menu-item li {
    height: auto;
    padding: 1rem 0 0 1.3rem;
  }


  .third-menu-item {
    display: none;
  }

  .third-menu-item li {
    height: auto;
    padding: 1rem 0 0 1.6rem;
  }

  .menu-item > li {
  }

  .container > nav > ul.open {
     display:block;
  }

  .menu-item > li:nth-child(3) > ul.open {
    display: block;
  }

  .second-menu-item > li:last-child > ul.open {
    display: block;
  }

}

@media only screen and (min-width: 20em) and (max-width: 30em) {
  .container > nav {
    background: #000000;
    height: auto;
  }

  .container > nav > div {
    display: none;
  }

  .container > nav > a {
    display: block;
    font-size: 1.6rem;
    font-weight: bold;
    padding: 1rem 2rem;
  }

  .menu-item {
    display: none;
  }

  .menu-item li {
    height: auto;
    padding: 1rem 0 0 1rem;
  }

  .second-menu-item {
    display: none;
    height: auto;
  }

  .second-menu-item li {
    height: auto;
    padding: 1rem 0 0 1.3rem;
  }


  .third-menu-item {
    display: none;
  }

  .third-menu-item li {
    height: auto;
    padding: 1rem 0 0 1.6rem;
  }

  .menu-item > li {
  }

  .container > nav > ul.open {
     display:block;
  }

  .menu-item > li:nth-child(3) > ul.open {
    display: block;
  }

  .second-menu-item > li:last-child > ul.open {
    display: block;
  }
}


/* 弹性布局 */

.main {
  border:1px solid #eee;
  min-height: 300px;
}

.product-list{
  display: flex;
  flex-wrap:wrap;
}

.product > img {
  width:70px;
  height: 60px;
}

.product-list > .product {

  margin: 8px;
  text-align: center;
  width:80px;
  height:120px;
  border:1px solid #eee;
}

.product-list > h1 {
  width: 100%;
  margin-left: 2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}
